<?php
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
 
// import Joomla controller library
jimport('joomla.application.component.controller');
 
/**
 * ZOrder Component Controller
 */
class ZOrderController extends JControllerLegacy
{
	public function display($cachable = false, $urlparams = false)
	{		
		$cachable = true;	
		// Get the document object.
		$document = JFactory::getDocument();
		$css = JURI::root(false)."components/com_zorder/resources/css/style.css";
		$js = JURI::root(false)."components/com_zorder/resources/javascripts/ZOrder-lib.js";		
		//$jquery = "http://code.jquery.com/jquery-1.7.2.min.js";
		$doc =& JFactory::getDocument();
		$doc->addScript($js);
		//$doc->addScript($ajax_paging);
		$doc->addStyleSheet($css);
	
		// Set the default view name and format from the Request.
		$vName		= JRequest::getCmd('view', 'publications');
		JRequest::setVar('view', $vName);
		
		//$user = JFactory::getUser();
	
		$safeurlparams = array('catid'=>'INT','id'=>'INT','cid'=>'ARRAY','year'=>'INT','month'=>'INT','limit'=>'INT','limitstart'=>'INT',
				'showall'=>'INT','return'=>'BASE64','filter'=>'STRING','filter_order'=>'CMD','filter_order_Dir'=>'CMD','filter-search'=>'STRING','print'=>'BOOLEAN','lang'=>'CMD');
	
		parent::display($cachable,$safeurlparams);
		return $this;
	}
}
